Using .NET Screen Elements During Runtime
You can use the Monitor to view captured screen elements during runtime.
To view .NET screen elements during runtime:
1. | Run the project and select Monitor (for more information, see Running the Monitor). |
2. | Click Screen Element and expand the object hierarchy. |
3. | Select the relevant .NET screen element control in the tree. |
The properties of the screen element are listed in the Properties tab on the right.
The Monitor only displays properties of simple types (Boolean, DateTime, Decimal, Number, and Text). To view properties of other types (such as List, Screen Element Rectangle, and other library screen elements types), you must bind them to business entities in the project (see Defining Business Entity Types).
4. | Click the Functions tab. |
The functions of the screen element are listed in the Available Functions drop-down list.
The Monitor displays only functions of simple return types (the functions of types such as List, PO and CtrlPO are not shown). To use functions that are not shown, you need to define them in the Business Entities module (see Defining Business Entity Types).
5. | To locate the selected screen element in the .NET application, in the Available Functions drop-down list, select the Locate function and then click Invoke. |
The Monitor is minimized and the control appears in the .NET application framed by a blinking red border.
Additional Functions
The following additional functions are listed in the Available Functions drop-down list in the Monitor:
Activate and Lock Instance: Locks a specific screen element and makes it the active element. When you apply this function, the screen element itself and all its parent screen elements in the hierarchy are locked. For example, if you have multiple instances of an application, and at the beginning of each interaction you want to connect only to a single relevant instance and stay connected until the interaction is complete, you can use the Activate And Lock Instance function at the beginning of the interaction and then use the Unlock Active Instance function to unlock the active instance when the interaction is complete.
Activate Context Menu Item: Activates a context menu item. For this function, you need to define the value of the Item Path parameter as a text list.
Activate Default Action: Activates the default action of the child object, if a default action is defined. For this function, you need to define the value of the Child Control Text parameter as a text list.
Bring to Front: Moves the selected .NET screen element to the top of the stacking order and brings the object to the front.
Click on Point: Clicks a specified point in a physical element. For this function, you need to define the x and y parameters to specify the point on the selected screen element on which you want to click.
Destroy and Refresh: Validates the objects beginning from the level of the currently selected screen element in the hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and all their child objects down the hierarchy.
Do Accessible Default: Performs the accessible default action of the object.
Double Click on Point: Double-clicks a specified point in a physical element. For this function, you need to define the x and y parameters to specify the point on the selected screen element on which you want to double-click.
Emulate Keyboard: Emulates the text entered from the keyboard. For this function, you need to define the text you want to simulate in the Text parameter.
Emulate Mouse Click: Emulates a right-click on the .NET object. For this function, you need to place the object in focus before invoking the function.
Evaluate: Runs the script defined in the script parameter on the selected screen element.
Execute Addon Function: Executes an add-on function on the selected screen element. For this function, you need to specify the name of the function you want to execute in the Name parameter.
Execute Command: Executes a command on the selected screen element. For this function, you need to specify the Method, Class, and Assembly of the command you want to execute.
Get Property: Gets the textual value of a property of the selected screen element by its name. For this function, you need to define the property in the Property Name parameter (case-sensitive).
Get Text Color: Gets the text color of the selected screen element.
Locate: Locates the selected screen element in the .NET application. The control is framed by a blinking red border in the .NET application.
Recognize Children: Recognizes the children of the selected screen element.
Refresh: Validates the screen elements beginning from the top level in the objects hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and all child objects down the hierarchy.
Right Click on Point: Right-clicks a specified point on the selected screen element. For this function, you need to define the x and y parameters to specify the point on the screen element on which you want to right-click.
Set Focus: Moves the focus to the selected screen element.
Unlock Active Instance: Unlocks the active instance locked by the Activate And Lock Instance function, and therefore must be applied on the same instance that was locked.
Validate Children: Validates the children of the selected screen element.